package com.starmark.gateway.springcloud.provider.exception;

import lombok.Getter;

/**
 * 系纺异常信息
 */
@Getter
public enum SystemErrorType implements ErrorType {

    SYSTEM_ERROR(-1, "系统异常"),

    SYSTEM_BUSY(200, "系统繁忙,请稍候再试"),

    GATEWAY_NOT_FOUND_SERVICE(404, "服务未找到"),
    GATEWAY_ERROR(500, "网关异常"),
    GATEWAY_CONNECT_TIME_OUT(201, "网关超时"),

    ARGUMENT_NOT_VALID(202, "请求参数校验不通过"),
    UPLOAD_FILE_SIZE_LIMIT(203, "上传文件大小超过限制"),

    DUPLICATE_PRIMARY_KEY(204,"唯一键冲突"),
    SPEC_URL_ERROR_ACCESS(205,"接口已下架,禁止该问"),
    SPEC_URL_MULTI_REQUEST(206,"当前请求过多");
    /**
     * 错误类型码
     */
    private int code;
    /**
     * 错误类型描述信息
     */
    private String msg;

    SystemErrorType(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
